Part Number Hot Search : 
PT7874P 385103 1N5230 GS25U18 KK74A N80C31BH ZVP4105A EPD1006
Product Description
Full Text Search
 

To Download PAK-I Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  p a k - i d a t a s h ee t ? 1 9 98 , 19 9 9 b y a w c a w c 310 i v y g l en c ou r t lea g ue c i t y , t x 7757 3 ( 281 ) 3 3 4 - 43 41 h tt p :/ / www . a l - w i l l i a m s . c o m / a w c e . h t m v 1 . 4

o v e r v i e w t h e s t a m p p a k i i s a 3 2 - b it f l o a ti n g - po i n t m a t h c op r o c e ss o r w it h a v e r s a t il e i n t e rf a c e t h a t m a k e s i t ea s y t o i n t e rf a c e it w it h a v a r i e t y o f mi c r o c on t r o ll e r s i n c l ud i n g t h e b a s i c s t a m p f r o m p a r a ll a x . h o w e v e r , y ou c a n ea s i l y i n t e r f ace t h e p a k i w it h p r ac ti c a l l y a n y m od e r n mi c r op r o c e ss o r . t h e p a k i c a n a dd, s ub t r a c t , m u lti p l y , a nd d i v i d e nu m b e r s b e t w e e n + / - 6. 8 0564693 x 10 3 8 . t h e s m a ll e s t nu m b e r t h e p a k i ca n r e p r e s e n t i s + / - 1.17549435 x 10 - 38 . h e r e a r e s o m e o f t h e p a k i ' s m a j o r f ea t u r e s : r obu s t , s p ee d i nd e p e nd e n t s e r i a l i n t e rf a c e u s e s a s f e w a s 2 p i n s t o c onn ec t t o t h e ho s t c a n c onn ec t m u lti p l e d e v i ce s t o t h e s a m e 2 p i n s w it h on e a dd iti on a l p i n p e r d e v i c e c a n w o r k w it h i eee 754 f l o a ti n g po i n t nu m b e r s w o r k s w it h s t a m p i i ' s s h i f t o u t a nd s h i f t i n c o mm a nd s s y n c h r onou s o p e r a ti on C r ea d r e s u lt s w h e n y o u a r e r ea d y f o r t h e m a dd s 8 - b it s o f g e n e r a l - p u r po s e d i g it a l i / o p i n s f a s t 10 m h z s p ee d ( ca n b e r e d u ce d t o s a v e po w e r ) e a s y t o u s e t h e p a k i i s a s t a nd a r d 1 8 - p i n i c . i n o r d e r t o op e r a t e it m u s t h a v e a r e g u l a t e d s upp l y o f 5 v a n d c onn ec ti on t o a c l o c k e l e m e n t . t h e s t a m p p a k i
i n c l ud e s a 10 m h z ce r a m i c r e s on a t o r t h a t y ou ca n u s e t o c l o c k t h e c h i p . o t h e r t h a n t h e po w e r a n d c l o c k c onn e c ti on s , t h e p a k i r e qu i r e s a t l ea s t t w o w i r e s t o c onn e c t b e t w ee n y o u r mi c r o c on t r o ll e r ( t h e ho s t ) a nd it s e l f . d e p e nd i n g on t h e ho s t ' s ca p a b iliti e s a nd y ou r a pp li ca ti on, y ou m a y w a n t t o u s e m o r e p i n s f o r i / o ( up t o 5 p i n s ) . i f y ou n ee d h e l p i f y ou r e qu i r e a ss i s t a n c e w it h y ou r p ak - i , p l ea s e f ee l f r ee t o c on t ac t u s . t h e b e s t w a y t o g e t s uppo r t i s v i a e - m a il ( s t a m p @ a l - w illi a m s . c o m ) . h o w e v e r , y o u m a y a l s o ca ll b e t w e e n 9 a m - 4 p m c e n t r a l t im e a t ( 281 ) 334 - 4341. y ou ca n a l s o f a x t o ( 281 ) 538 - 2147. b e s u r e t o c h e c k ou t ou r w e b p a g e f o r upd a t e s a t www . a l - w illi a m s . c o m/ a w ce .h tm . r e g i s t e r i ng y ou r p a k - i p l ea s e t a k e a m o m e n t t o r e g i s t e r y ou r e - m a i l a dd r e ss w it h a w c . s im p l y s e nd a n e - m a i l m e ss a g e t o p a k r e g @ a l - w illi a m s . c o m . a w c w i ll no t m a k e y o u r a dd r e ss a v a il a b l e t o o t h e r c o m p a n i e s , bu t w e m a y p e r i od i ca l l y s e nd y o u upd a t e d t ec hn i c a l no t e s . y ou ll a l s o r e c e i v e i n f o r m a ti on a bou t n e w m i c r o c on t r o ll e r p r odu c t s a nd s p ec i a l s .
sin sout clk reset vss b0 b1 b2 b3 b4 b5 b6 b7 vdd res1 res2 enable/busy busy/mode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 PAK-I
p i n c onn ec t i on s p i n n a m e t y p e d e s c r i p ti on 1 8 b u s y / m od e i n p u t/ o u t pu t t h i s p i n h a s t w o f un c t i o n s . a t s t a r t u p , i f t h e p i n i s p u ll e d u p b y a r e s i s t o r , t h e p a k 1 u s e s t h i s p i n a s a b u s y i n d i ca t o r . t h e p i n w ill r ea d 0 w h e n t h e p a k 1 i s n o t bu s y . h o w e v e r , i f a t s t a r t u p t h e p i n i s pu ll e d t o g r o un d , t h e p a k 1 w i l l i n d i ca t e i t s b u s y s t a t u s on t h e e n a b l e / b u s y p i n . 1 7 e n a b l e / b u s y i n p u t o r o p e n c o ll ec t o r o u t pu t i f b u s y / m od e i s p u ll e d h i g h a t s t a r t u p , t h e e n a b l e / b u s y p i n i s o n l y a n i np u t . b r i ng it l o w t o d i s a b l e t h e p a k 1 , o r h i g h t o e n a b l e it . h o w e v e r , i f b u s y / m od e i s p u l l e d l o w a t s t a r t u p , t h i s p i n s e r v e s a s a n op e n - c o ll ec t o r i / o p i n . i f t h e h o s t p u l l s t h e p i n l o w , it d i s a b l e s t h e p a k 1 . i f t h e p a k 1 i s b u s y , it p u ll s t h e p i n l o w . 3 c l k i n p u t t h e h o s t p u l s e s t h e c l k p i n t o s h i f t d a t a i n o r o u t o f t h e p a k 1 . 1 s i n i n p u t t h e p a k 1 r ea d s d a t a f r o m t h i s p i n . y o u m a y s h o r t s i n a n d s o u t a n d u s e t h e s a m e p i n f o r i n p u t a n d o u t p u t i f t h e h o s t i s ca p a b l e o f t r ea ti n g a s i n g l e p i n a s a n i / o p i n . 2 s ou t o p e n c o ll ec t o r o u t pu t t h e p a k 1 w r it e s d a t a t o t h e ho s t o n t h i s p i n . s i n ce t h e p i n i s op e n c o ll ec t o r , y o u ' ll n ee d a r e s i s t o r t o 5 v o n t h i s p i n . y o u m a y s h o r t s i n a n d s ou t t o g e t h e r t o u s e o n e p i n f o r i / o 4 r e s e t i n p u t h a r d w a r e r e s e t s t h e p a k 1 w h e n l o w . 5 v s s p o w e r g r o un d 1 4 vd d p o w e r + 5 v 1 5 r e s 1 c l o c k c on n ec t s t o r e s o n a t o r 1 6 r e s 2 c l o c k c on n ec t s t o r e s o n a t o r 6 - 1 3 b 0 - b 7 i / o g e n e r a l p u r po s e i / o
s o f t w a r e c o mm a nd s c o d e n a m e a l t e r n a t e a r g u m e n t r e t u r n s d e s c r i p t i on $ 01 l o a d x n / a f p n o t h i n g l o a d x $ 02 l o a d y n / a f p n o t h i n g l o a d y $ 03 r e a d x n / a n o n e f p r e a d x $ 04 s w a p n / a n o n e n o t h i n g s w a p x a n d y $ 05 d i g i t n / a d i g i t a s c i i d i g i t f i nd a s c ii d i g it fr o m x $ 06 i eee c v t n / a n o n e n o t h i n g c o n v e r t x t o i eee f o r m a t $ 07 f l o a t $ 87 n o n e s t a t u s 24 - b i t i n t e g e r i n x t o f l o a ti n g p o i n t $ 08 c o m m c k n / a n o n e $ 22 c o mm u n i c a ti o n s c h e c k $ 09 f p c v t n / a n o n e n o t h i n g c o n v e r t x fr o m i eee f o r m a t $0 a c h s n / a n o n e n o t h i n g x = - x $ 0 b i n t $ 8 b n o n e s t a t u s c o n v e r t x t o 2 4 - b it i n t e g e r $ 0 c m u l $ 8 c n o n e s t a t u s x = x * y $0 d d i v $8 d n o n e s t a t u s x = x / y $ 0 e s u b $ 8 e n o n e s t a t u s x = x - y $0 f a d d $8 f n o n e s t a t u s x = x + y $ 10 o p t n / a o p t s n o t h i n g s e t s o p ti o n b i t s $ 11 a b s n / a n o n e n o t h i n g x = | x | $ 12 s t o 0 n / a n o n e n o t h i n g r 0 = x $ 13 rc l 0 n / a n o n e n o t h i n g x = r 0 $ 14 d i r n / a d i r s n o t h i n g s e t s d i r e c t i on r e g i s t e r $ 15 r i o n / a n o n e i b y t e r e a d s i n p u t b y t e fr o m p o r t $ 16 w i o n / a o b y t e n o t h i n g w r it e s b y t e t o o u t p u t p o r t $ 17 x t o y n / a n o n e n o t h i n g x = y $ 18 y t o x n / a n o n e n o t h i n g y = x $ 92 s t o 1 n / a n o n e n o t h i n g r 1 = x $ 93 rc l 1 n / a n o n e n o t h i n g x = r 1 n o t e s a n d k e y : f p C 3 2 b i t f l o a t i n g p o i n t n u m b e r ( s e e t e x t f o r f o r m a t ) d i g i t C a d i g it n u m b e r . z e r o r e t u r n s + , - , o r s p ac e i f t h e n u m b e r i s p o s i t i v e , n e g a t i v e , o r ze r o . s ee r e f e r e n c e f o r m o r e d e t a i l s . a s c i i d i g i t C t h e a s c i i r e p r e s e n t a ti on o f t h e r e qu e s t e d d i g it s t a t u s C f l o a ti n g p o i n t e rr o r f l a g s o p t s C o p t i o n s ( $8 0 t u r n s on s a t u r a ti on ; $ 4 0 e n a b l e s r o un d i n g ) r 0 , r 1 C t e m p o r a r y s t o r a g e r e g i s t e r s
d i r s C b y t e i n d i ca ti n g p o r t d i r e c ti o n s ( 0 = i np u t , 1 = ou t pu t ) i b y t e , o b y t e C i np u t o r ou t pu t b y t e u s i n g t h e a l t e r n a t e f o r m o f a c o m m a n d p r e v e n t s i t fr o m r e t u r n i n g t h e s t a t u s r e s u lt . f l o a t i ng p o i n t n u m b e r s a nd e r r o r s t h e 32 - b it f l o a ti n g po i n t r e p r e s e n t a ti on u s e d b y t h e p a k i i s a m od i f i e d v e r s i on o f t h e i eee 75 4 f o r m a t . t h e f i r s t b y t e i s t h e e x pon e n t ( b i a s e d b y 127 ) . i f t h e e x pon e n t i s z e r o, t h e nu m b e r i s z e r o . t h e s ec ond b y t e c on t a i n s t h e m o s t s i g n i f i ca n t b it s o f t h e m a n ti ss a . t h e m o s t - s i g n i f i ca n t b it i s t h e s i gn b it ( 1 i s n e g a ti v e ) a nd t h e m a n ti ss a s t a r t s w it h a n im p li e d 1 b e f o r e t h e d ec i m a l po i n t . t h e n e x t t w o b y t e s a r e t h e r e m a i nd e r o f t h e m a n ti ss a . t h i s d i ff e r s fr o m t h e i e e e 745 f o r m a t ( t h e o n e u s e d b y p c c c o m p il e r s , f o r e x a m p l e ) on l y s li g h t l y . i n t h e i eee 7 45 f o r m a t , t h e s i g n i s i n t h e m o s t - s i g n i f i ca n t b it o f t h e e x pon e n t . t h e m o s t - s i g n i f i ca n t b it o f t h e f i r s t b y t e i s a c t u a l l y t h e l ea s t s i g n i f i ca n t b it o f t h e e x pon e n t . o t h e r w i s e , t h e t w o f o r m a t s a r e i d e n ti ca l . t h e p a k i h a s f u n c ti on s t o c onv e r t b a c k a nd f o r t h b e t w ee n t h e t w o f o r m a t s . t h e a c c o m p a n y i n g d i s k c on t a i n s a w i ndo w s p r og r a m ( f c onv e r t . e x e ) t h a t w ill c onv e r t b e t w e e n a no r m a l f l o a ti n g po i n t n u m b e r , t h e p a k i ' s f o r m a t , a nd t h e i eee 745 f o r m a t . s im p l y e n t e r t h e nu m b e r y o u kno w a nd t h e p r o g r a m w ill d i s p l a y t h e o t h e r t w o f o r m a t s . t h e s t a t u s r e t u r n b it s c o n t a i n t h e f o ll o w i ng
i n f o r m a ti on : b it 0 C i n t e g e r o v e rf l o w b it 1 C f l o a ti n g po i n t ov e rf l o w b it 2 C f l o a ti n g po i n t und e rf l o w b it 3 C d i v i d e b y ze r o b it s 4 - 7 C r e s e r v e d ; a l w a y s 0 . a r e t u r n o f z e r o i nd i c a t e s no e rr o r . r ese tt i ng t h e r e a r e s e v e r a l w a y s y ou ca n r e s e t t h e p a k i . i t i s a g ood i d e a t o r e s e t t h e un it b e f o r e u s i n g it , o r a n y tim e t h a t y ou w a n t t o m a k e s u r e it i s i n a kno w n s t a t e . t h i s i s e s p e c i a l l y t r u e w h e n u s i n g t h e s t a m p. e ac h tim e t h e s t a m p r e s e t s o r w a k e s u p fr o m s l ee p, t h e i / o p i n s b r i e f l y b ec o m e i npu t s . t h i s ca n f oo l t h e p a k i i n t o s t a r ti n g a d a t a t r a n s f e r . a l w a y s r e s e t t h e p a k i f i r s t . t h e b e s t w a y t o r e s e t a s i n g l e p a k i i s t o s e nd a s p ec i a l r e s e t s e qu e n ce o v e r t h e c l o c k a nd d a t a li n e s . t h i s h a s t h e a dv a n t a g e t h a t it do e s n ' t r e qu i r e a n y e x t r a i / o fr o m t h e h o s t . t o s e nd a r e s e t s e qu e n c e , b r i n g t h e d a t a p i n t o 0 a nd r a i s e t h e c l o c k t o a 1. w h il e t h e c l o c k r e m a i n s i n t h e 1 s t a t e , b r i n g t h e d a t a p i n h i g h. t h i s w ill i nd i ca t e t o t h e p a k i t h a t y ou w i s h t o r e s e t . w h e n t h e c l o c k r e t u r n s t o a z e r o s t a t e , t h e p a k i w ill r e s e t . t h e r e s e t do e s n ' t c h a n g e a n y r e g i s t e r v a l u e s o r po r t p i n s , bu t it do e s r e s e t c o mm un i ca ti on s t o a kno w n s t a t e . y ou ca n g e t t h e s a m e r e s u lt b y b r i n g i n g t h e e n a b l e
p i n l o w a nd t h e n r e t u r n i n g it t o h i g h t o e n a b l e t h e p a k i . t h i s i s u s e f u l i f y o u a r e c onn ec ti n g m o r e t h a n on e p a k t o t h e s a m e d a t a a nd c l o c k li n e s . y ou ' ll n e e d t o u s e t h e e n a b l e p i n t h e n a n y w a y , a n d it m a k e s s u r e t h a t t h e s e l ec t e d p a k i s a l w a y s i n a kno w n s t a t e . u s i ng t h e d a t a s e qu e n ce m e t hod m a y b e un r e li a b l e w h e n u s i n g m u lti p l e p a k s t o g e t h e r . f i n a l l y , y ou ca n f o r c e a h a r d w a r e r e s e t b y b r i n g i n g t h e r e s e t p i n l o w . h o l d i n g t h e c l o c k p i n h i g h f o r m o r e t h a n 2400 m s w ill a l s o f o r ce a r e s e t . t h i s mi g h t b e u s e f u l i f y o u r c i r c u it g e n e r a t e s a h a r d w a r e r e s e t s i g n a l b a s e d on a b r o w n - ou t d e t ec t o r o r o t h e r m a s t e r r e s e t c i r c u it . n o r m a l l y , y ou ' l l j u s t c onn ec t t h e r e s e t p i n t o t h e + 5 v s upp l y a nd a ll o w t h e p a k i t o r e s e t it s e l f on po w e r up. i f y o u do w a n t t o d r i v e t h i s p i n , m a k e s u r e t h a t it i s a t 5 v f o r no r m a l o p e r a ti o n. y ou ca n u s e a r e s e t s w it c h o r o t h e r d e v i ce i f y o u pu ll up t h e r e s e t p i n w it h a 10 k - 22 k r e s i s t o r . c o mm un i ca t i on s t h e r e a r e s e v e r a l s c h e m e s y ou c a n u s e t o c o mm un i ca t e w it h t h e p a k i . a ll o f t h e m r e vo l v e a r ou nd a s y n c h r onou s p r o t o c o l i nvo l v i n g a c l o c k p i n a nd 1 o r 2 d a t a p i n s . d a t a i s s h i f t e d m o s t s i g n i f i ca n t b it f i r s t , a nd s a m p l e s a t t h e r i s i n g e d g e o f t h e c l o c k. a ll s i g n a l s a r e po s iti v e l o g i c ( t h a t i s , a 1 i s a h i g h l o g i c l e v e l ) . t h e p a k i e x po s e s a s e p a r a t e i npu t ( s i n ) a nd ou t pu t ( s ou t ) p i n s f o r ho s t s t h a t ca n ' t ea s i l y h a n d l e b i - d i r ec ti on a l i / o li n e s . h o w e v e r , f o r ho s t s li k e t h e s t a m p o r p i c , it i s a s im p l e m a tt e r t o ti e t h e s e li n e s t og e t h e r s i n ce
s ou t i s op e n c o ll ec t o r . t h e r e f o r e , t h e mi n im u m nu m b e r o f li n e s y ou n e e d a r e t w o. a n ou t pu t f o r t h e c l o c k a nd a n i / o li n e t o c o nn ec t t o s i n a nd s o u t . y ou ' ll c on n ec t t h e e n a b l e / b u s y p i n t o + 5 v a nd u s e a pu ll up r e s i s t o r t o 5 v on t h e b u s y / m od e p i n. t h i s a ll o w s y ou t o r e s e t t h e d e v i ce a nd c o m m un i ca t e w it h it . t h e on l y p r ob l e m i s , y ou w ill h a v e t o m a k e s u r e no t t o a s k t h e d e v i ce f o r d a t a w h il e it i s p r o ce ss i n g . m o s t op e r a ti on s a r e qu it e f a s t , bu t s o m e op e r a ti on s ( ca l c u l a ti n g d i g it s a nd d i v i s i on, f o r e x a m p l e ) c a n t a k e a s m u c h a s 400u s w it h t h e p r ov i d e d c o m pon e n t s . f o r s o m e a pp li c a ti on s , t h i s i s n ' t a p r ob l e m . f o r e x a m p l e , a s t a nd a r d b a s i c s t a m p i i ca n ' t o p e r a t e f a s t e no u g h f o r t h i s t o b e a p r ob l e m e x ce p t f o r d i v i s i on a nd d i g it ca l c u l a ti on s . h o w e v e r , y ou m a y w a n t t o kno w w h e n t h e d e v i ce i s r e a d y t o p r o c e ss . t h e r e a r e t w o w a y s y ou ca n a cc o m p li s h t h i s . i f y ou n ee d t o d i s a b l e a n d e n a b l e t h e d e v i ce , y o u ' l l w a n t t o d r i v e t h e e n a b l e / b u s y p i n. u s i n g t h i s p i n a ll o w s y ou t o s h a r e t h e s i n , s ou t , a nd c l k li n e s w it h o t h e r d e v i ce s t h a t u s e a s imil a r p r o t o c o l . s o t o c onn ec t 5 p a k s y o u ' d on l y n e e d 7 i / o li n e s ( 5 e n a b l e s , 1 s i n / s ou t , a n d 1 c l k li n e ) . y ou d r i v e t h e e n a b l e / b u s y p i n l o w t o d i s a b l e t h e d e v i ce . i f y o u do n ' t p l a n t o u s e t h i s ca p a b ili t y , j u s t pu ll t h e p i n h i g h w it h a pu ll up r e s i s t o r . i f y ou a r e u s i n g t h e b u s y / m od e i npu t ( s e e b e l o w ) y ou ca n s till u s e a pu ll up r e s i s t o r , o r j u s t ti e t h e e n a b l e / b u s y p i n
d i r ec t l y t o + 5 v . i f y ou g r ound t h e b u s y / m od e i npu t a t s t a r t up, t h e d e v i ce w ill a l s o u s e t h e e n a b l e / b u s y p i n t o t e ll y o u w h e n it i s un a v a il a b l e . i t d o e s t h i s b y d r i v i ng t h e li n e l o w w h e n it i s no t r ea d y . t h a t m e a n s t h e ho s t m u s t d r i v e t h e p i n w it h a n op e n c o ll ec t o r ou t pu t i f it w a n t s t o d i s a b l e t h e d e v i ce . i f y ou do n ' t n ee d t o d i s a b l e t h e d e v i c e , y ou ca n j u s t c on n ec t t h e p i n t o a pu ll up r e s i s t o r a nd c onn ec t t h e e n a b l e / b u s y p i n t o a n i npu t on t h e ho s t . i f y ou w a n t t o u s e a no r m a l ou t pu t t o d r i v e t h e e n a b l e / b u s y p i n, bu t y o u s till w a n t a bu s y i nd i ca ti on, y ou c a n c on n ec t t h e b u s y / m o d e p i n t o 5 v t h r ou g h a pu ll up r e s i s t o r . t h e n t h e p a k i w il l u s e t h e b u s y / m od e p i n t o s i g n i f y it i s bu s y ( t h e p i n i s h i g h w h e n bu s y ) . i n t h i s ca s e , t h e e n a b l e / b u s y p i n i s a l w a y s a n i npu t a n d y ou c a n d r i v e i t no r m a l l y . m a n y c o mm a nd s h a v e a n a lt e r n a t e f o r m . t h e s e c o mm a nd s a r e t h e on e s t h a t r e t u r n t h e f l o a ti ng po i n t e rr o r f l a g s on c o m p l e ti on. u s i n g t h e a lt e r n a t e f o r m s upp r e ss e s t h e s t a t u s r e t u r n v a l u e . o n e t h i n g t o no t e a bou t t h e s t a t u s r e t u r n s . a ll o f t h e c o mm a nd s t h a t t a k e a n y s i g n i f i ca n t a m oun t o f tim e w ill r e t u r n z e r o s i n t h e t op b it o f t h e r e s pon s e . y ou ca n u s e t h i s a s a f o r m o f bu s y i nd i ca ti on i f y o u a r e un w illi n g t o u s e a n y o t h e r p i n s . s im p l y r ea d t h e d a t a p i n un til it r ea d s z e r o. t h i s i nd i ca t e s t h a t t h e d e v i ce i s s e nd i n g t h e r e s pon s e . t h e
r e adx a nd r i o c o mm a nd s do no t f o ll o w t h i s c onv e n ti on, bu t t h e y t a k e v e r y littl e tim e t o e x ec u t e a n y w a y ( l e ss t h a n 8u s ) . t o s u m m a r i z e , h e r e a r e t h e w a y s y ou c a n s y n c h r on i z e w it h t h e p a k i : 1. d e l a y l o n g e no u g h t o i n s u r e t h e op e r a ti on i s c o m p l e t e 2. m on it o r t h e e n a b l e / b u s y li n e w h il e b u s y / m od e i s g r ound e d. i f y ou b r i n g e n a b l e / b u s y l o w i t i nd i ca t e s t h a t t h e p a k i i s d i s a b l e d. i f t h e p a k i b r i n g s t h e p i n l o w , it m e a n s it i s e n g a g e d i n op e r a ti on s . 3. p l ace a pu ll up r e s i s t o r on t h e b u s y / m od e p i n . t h i s w ill c a u s e t h e b u s y / m od e p i n t o b e h i g h w h e n t h e p a k i i s bu s y . 4. o n c o mm a nd s t h a t r e t u r n s t a t u s o r a s c i i d i g i t s , y o u c a n w a it un til t h e d a t a p i n g o e s l o w . c o mm a nd r e f e r e n ce ab s f i nd s t h e a b s o l u t e v a l u e o f x . t h a t i s i f x i s n e g a ti v e , n e g a t e it . i f x i s z e r o o r po s iti v e , l ea v e it a l on e . ad d a dd s x a nd y l e a v i n g t h e r e s u lt i n x . y i s un c h a n g e d. t h i s c o mm a nd m a y t a k e a pp r o x im a t e l y 110u s i n t h e w o r s t ca s e .
ch s n e g a t e s t h e x r e g i s t e r . c o mm c k t h i s c o mm a nd ca u s e s t h e p a k i t o i ss u e a $22 r e s pon s e . y ou ca n u s e t h i s t o c h ec k c o mm un i ca ti on s . t h e p a k i w ill a l w a y s r e s pond w it h $20 p l u s t h e v e r s i on nu m b e r . d igi t t h e d i g i t c o mm a nd ac ce p t s a s i n g l e b y t e a s a n a r g u m e n t a nd r e t u r n s a s i n g l e b y t e . i f t h e i npu t b y t e i s a z e r o, d i g i t r e t u r n s a n a s c ii + , a nd a s c i i C o r a b l a nk c h a r a c t e r d e p e nd i n g on i f t h e x r e g i s t e r i s po s iti v e , n e g a ti v e , o r z e r o. y ou c a n u s e t h i s a s a s gn f un c ti on, bu t it i s m o s t l y u s e f u l w h e n w r iti n g nu m b e r s i n r ea d a b l e f o r m . i f t h e i npu t nu m b e r i s l e s s t h a n $7 f , d i g i t r e t u r n s t h e a s c i i d i g it f r o m t h e x r e g i s t e r t h a t y ou a s k f o r . f o r e x a m p l e , i f x c on t a i n s 13.141 a nd y ou i ss u e a d i g i t 1 c o mm a nd , t h e r e t u r n w ill b e ' 3 ' . d i g i t 2 w ill r e t u r n ' 1 ' . n u m b e r s g r e a t e r t h a n $ 8 0 r e t u r n a s c ii c h a r ac t e r s t o t h e r i g h t o f t h e d ec im a l po i n t . s o u s i n g t h e s a m e e x a m p l e , i f y ou i s s u e a d i g i t $81, t h e r e t u r n w i ll b e ' 1 ' . d i g i t $82 w ill r e t u r n ' 4 ' .
t h i s c o mm a nd do e s no t a ff e c t t h e x o r y r e g i s t e r s . i t m a y t a k e s o m e tim e t o e x ec u t e d e p e nd i n g on t h e d i g it y o u r e qu e s t , a nd t h e nu m b e r i n t h e x r e g i s t e r . t h i s c o mm a nd p e rf o r m s a c o m p l e x a l g o r it h m w h i c h i nvo l v e s c onv e r ti n g t h e nu m b e r t o a n i n t e g e r a n d b ac k t o a f l o a t i n s e v e r a l p l a ce s . s i n ce i n t e g e r t o f l o a t c onv e r s i on i s limit e d t o 24 b it s , t h i s p l ace s a n upp e r limit on t h e s i z e o f t h e nu m b e r y o u c a n c on v e r t w it h d i g i t . n o t e t h a t t h i s do e s no t a pp l y t o u s i n g it a s a r e p l ace m e n t f o r s gn . i f y ou o p e r a t e on a l a r g e nu m b e r ( o r a nu m b e r w it h m a n y s i g n i f i ca n t d i g it s ) a nd a n i n t e r m e d i a t e r e s u l t e x cee d s 24 b it s , y o u m a y g e t a n i n c o r r ec t a n s w e r , o r t h e p ak m a y f a il t o c onv e r g e . d i r t h i s c o mm a nd a ll o w s y o u t o s e t t h e d i r ec ti on s o f t h e 8 b it i / o po r t . o n po w e r up, a ll p i n s a r e i npu t s . s e tti n g a b it t o 1 i n t h e d i r c o mm a nd c a u s e s t h e c o rr e s pond i n g i / o b it t o b e a n ou t pu t . s o i ss u i n g a d i r $83 w ill m a k e b 7, b 1, a n d b 0 ou t pu t s a nd a ll o t h e r p i n s i npu t s . d i v d i v i d e s x b y y l ea v i n g t h e r e s u lt i n x . y i s un c h a n g e d. t h i s c o m m a nd m a y t a k e a pp r o x im a t e l y 380u s i n t h e w o r s t ca s e .
fl o a t t h e f l o a t c o mm a nd c on v e r t s t h e 24 - b it i n t e g e r i n t h e x r e g i s t e r ' s m a n ti ss a i n t o a f l o a ti n g po i n t nu m b e r r e a d y f o r ca l c u l a ti on s . i eee c v t , f p c v t t h e s e c o mm a nd s c onv e r t t h e x r e g i s t e r t o i e e e f o r m a t , o r t o t h e p a k i ' s i n t e r n a l f o r m a t . i f y ou l o a d a n i e ee nu m b e r , y o u m u s t c onv e r t it b e f o r e u s i n g it i n ca l c u l a ti on s . o n c e y ou c onv e r t t o i eee , y o u m u s t c onv e r t b ac k b e f o r e u s i n g t h e nu m b e r i n a n y c a l c u l a ti on s . t h e s e op e r a ti on s a r e v e r y f a s t , s o it i s n ' t a p r ob l e m t o c onv e r t s e v e r a l tim e s . i n t c onv e r t s t h e x r e g i s t e r t o a 24 - b it i n t e g e r . t o r ea d t h e i n t e g e r , i ss u e a r e adx . i n o r d e r t o c on ti nu e ca l c u l a t i on s w it h t h e s a m e nu m b e r , y o u ' ll n ee d t o i ss u e a f l oa t c o mm a nd, o r r e l o a d t h e x r e g i s t e r . i t i s o f t e n qu i c k e r t o u s e a s t o c o mm a n d t o s a v e t h e x r e g i s t e r , p e rf o r m t h e i n t c o mm a nd, r ea d t h e r e s u l t , a nd t h e n r c l t h e o r i g i n a l c on t e n t s . l o ad x , l o ad y t h e s e c o mm a nd s t a k e t h e n e x t f ou r b y t e s
y o u s e nd a nd p l a c e s t h e m i n t h e x o r y r e g i s t e r . t h e f o r m a t i s e x pon e n t f i r s t , f o ll o w e d b y t h e m a n ti ss a ( m o s t s i g n i f i ca n t b it f i r s t ) . y ou ca n a l s o l o a d i n t e g e r s o r i e e e f o r m a t nu m b e r s f o r c onv e r s i on u s i n g t h i s c o mm a nd. m u l m u lti p li e s x a nd y l ea v i n g t h e r e s u lt i n x . y i s un c h a n g e d. t h i s c o mm a nd m a y t a k e a pp r o x im a t e l y 240u s i n t h e w o r s t ca s e . o p t s e t s op ti on s . s e nd t h e o p ti on b y t e a f t e r t h i s c o mm a nd. u s i n g $80 t u r n s on s a t u r a ti on ( w h i c h r e p r e s e n t s o v e r a nd und e rf l o w s a s mi n im u m a nd m a x im u m v a l u e s ) . u s i n g $40 e n a b l e s r ound i n g . i f t h i s op ti on i s no t on, r e s u lt s a r e t r u n ca t e d w h i c h i s f a s t e r , bu t l e ss acc u r a t e . o n a po w e r up r e s e t , bo t h f l a g s a r e o ff . rc l 0 , rc l 1 r eca ll s r e g i s t e r 0 o r 1 t o x . t h e r e g i s t e r i s un c h a n g e d . r e ad x t h i s c o mm a nd s e nd s t h e f ou r b y t e s t h a t c o m p r i s e t h e x r e g i s t e r t o t h e ho s t . t h e ho s t m u s t c l o c k i n 4 b y t e s . t h e f i r s t b y t e w ill b e t h e e x pon e n t , a nd t h e f o ll o w i ng t h r ee b y t e s t h e m a n ti ss a ( m s b f i r s t ) . n o t e t h a t i f y ou e x ec u t e a n i e ee c v t c o mm a n d
t h e r e s u lt w ill b e i n i ee e f o r m a t . i f y o u e x ec u t e a n i n t c o mm a n d, t h e e x pon e n t w ill b e m ea n i n g l e ss , a nd t h e m a n ti ss a w ill b e t h e 24 b it b i n a r y i n t e g e r r e s u lt . r io t h i s c o mm a nd r ea d s 8 b i t s fr o m t h e i / o po r t . o f c ou r s e , b it s s e t t o ou t pu t s w ill r ea d w h a t e v e r y ou a r e w r iti ng t o t h e m . t h e p a k s e nd s t h e b y t e imm e d i a t e l y . s t o 0 , s t o 1 s t o r e s x i n r e g i s t e r 0 o r 1. s ub c o m pu t e s x - y l ea v i n g t h e r e s u lt i n x . y i s un c h a n g e d. t h i s c o mm a nd m a y t a k e a pp r o x im a t e l y 110u s i n t h e w o r s t ca s e . s w a p s w a p s x a nd y w io t h i s c o mm a nd w r it e s 8 b it s t o t h e i / o po r t . t h i s on l y a f f ec t s p i n s t h a t a r e s e t a s ou t pu t s . s e nd t h e b y t e imm e d i a t e l y a f t e r t h e c o mm a nd . x t o y s t o r e s x i n y w it hou t c h a n g i n g x . y t o x s t o r e s y i n x w it hou t c h a n g i n g y .
t y p i ca l c i r c u i t s a nd s o f t w a r e c onn ec ti n g t h e p a k - i t o it s e x t e r n a l c o m pon e n t s i s s im p l e . s upp l y 5 v t o v d d a nd g r ound t h e v ss p i n . c onn ec t t h e t w o ou t e r p i n s o f t h e c e r a mi c r e s on a t o r t o t h e r e s 1 a n d r e s 2 p i n s ( t h e o r d e r do e s no t m a tt e r) . g r oun d t h e ce n t e r p i n o f t h e r e s on a t o r . c onn e c t t h e r e s et p i n t o 5 v . f o r t h e s im p l e s t m od e o f op e r a t i on c onn ec t t h e e na b l e / b u s y p i n t o 5 v a nd t h e b u s y / m od e p i n t o 5 v t h r ou g h a pu ll up r e s i s t o r ( 10 k - 22 k ) . o f c o u r s e , y ou ' ll a l s o n e e d t o m a k e c onn ec ti on s t o t h e ho s t mi c r op r o ce s s o r . y ou m a y a l s o w a n t t o m a k e d i ff e r e n t c onn ec ti on s t o e na b l e / b u s y a n d b u s y / m od e i f y ou w a n t t o u s e d i ff e r e n t m e t hod s o f s y n c h r on i z i n g . e x a m p l e 1. c onn ec ti on s t o s t a m p o r s imil a r ho s t
i f y ou a r e u s i n g t h e b a s i c s t a m p i i o r b a s i c s t a m p i i s x , y o u ' ll h a v e no p r o b l e m s u s i n g t h e s h i f t i n a nd s h i f t o u t c o mm a nd s . m a n y b a s i c s t a m p - c o m p a ti b l e c o m p il e r s h a v e t h e s e c o mm a nd s t oo. if y o u do n ' t h a v e a c ce ss t o t h e s e c o mm a nd s , do n ' t w o r r y . h e r e i s s o m e s im p l e c od e ( w r itt e n i n s im p l e p b a s i c ) t h a t s ho w s t h e a c ti on s y ou h a v e t o t a k e : ' b1 is the byte to shift shiftoutput: output datapin for b7=0 to 7 ' set data pin to 0 or 1 low datapin if (b1 & $80) <> $80 then so0 high datapin so0: b1=b 1*2 ' shift byte left high clkpin low clkpin ' could use pulsout next return ' b1 is byte to input byte sh iftinput: input datapin b1=0 for b7=0 to 7 b1=b1*2 b1=b1 | in15 high clkpin low clkpin ' could use pulso ut next return y ou ' ll f i nd a li b r a r y o f b a s i c s t a m p i i r ou ti n e s t h a t
a ll o w y ou t o a c c e ss t h e p a k i on t h e c o m p a n i on d i s k. h e r e i s a s im p l e p r o g r a m t h a t c oun t s fr o m 1 t o 1000 w h il e b li nk i n g a n l e d c onn e c t e d t o t h e p a k i ' s b 4 p i n : i var word gosub freset ' reset fpx=$10 ' set b4 to output gosub iodir gosub fzerox ' x =0 gosub fswap ' x<>y fpx=1 gosub floadint ' x=1.0 gosub fswap ' x<>y so x=0.0, y=1.0 debug "start...", cr for i=1 to 1000 fpx=i//2*$10 gosub iowrite ' blink light gosub fadd ' x=x+y fpx=4 gosub fdump ' print it out next debug "en d",cr h e r e i s t h e s a m e p r o g r a m , bu t i n s t ea d o f l o a d i n g 1 a s a n i n t e g e r , it l o a d s .5 : i var word gosub freset ' reset fpx=$1 0 gosub iodir gosub fzerox ' x=0 gosub fswap ' x<>y fpxhigh=$7e00 ' x=.5 fpxlow=0
gosub floadx fpx=3 gosub fdump gosub fswap ' x<>y so x=0.0, y=0.5 debug "start...",cr for i=1 to 1000 fpx=i//2*$10 gosu b iowrite gosub fadd ' x=x+y fpx=4 gosub fdump next debug "end",cr f r e qu e n t l y a ske d q u es t i on s q : h o w ca n i l o a d a p a r ti c u l a r nu m b e r t o t h e x o r y r e g i s t e r s ? a : t h e r e a r e t w o m e t ho d s . f i r s t , y ou ca n u s e t h e f p c onv e r t p r o g r a m t o d e t e r mi n e t h e 32 - b i t nu m b e r t h a t c o rr e s pond s t o t h e n u m b e r y o u w a n t . t h e n p a ss it t o t h e f l o a d x ( o r f l o a d y ) s ub r ou ti n e . y ou ca n a l s o u s e t h e l o adx o r l o ad y c o mm a nd d i r ec t l y . t h e o t h e r w a y y ou ca n l o a d a nu m b e r i s v i a t h e f l oa t o r f l o a d i n t c o mm a n d s . q : c a n i r un t h e p a k i f r o m a d i ff e r e n t c l o c k s ou r ce ? a : y e s . a n y c r y s t a l o r ce r a mi c r e s o n a t o r up t o 10 m h z m a y w o r k. r e m e m b e r , t h e c e r a mi c r e s on a t o r h a s ca p ac it o r s t h a t y ou w ill h a v e t o s upp l y i f y ou u s e a c r y s t a l o r a r e s o n a t o r w it hou t ca p a c it o r s . y o u ' ll u s e t w o ca p a c it o r s ( on e on eac h r e s p i n ) . y ou ' ll h a v e t o e x p e r im e n t a l l y d e t e r mi n e
t h e v a l u e s . s t a r t w it h a b o u t 15p f a nd w o r k up t o a s m u c h a s 100p f f o r v e r y l o w fr e q u e n c y c r y s t a l s . y ou ca n a l s o f ee d a n e x i s ti n g t t l - l e v e l c l o c k s i g n a l i n t o p i n 16. q : w ill r unn i n g t h e p a k i a t a l o w e r s p ee d r e du ce it s po w e r c on s u m p ti on ? w ill i t r un f a s t e r . a : y e s r unn i n g a t s l o w e r s p ee d s w ill s a v e po w e r . y ou w ill p r ob a b l y no t h a v e s u c c e ss ov e r c l o c k i n g t h e p a k i . h o w e v e r , c on t ac t a w c f o r i n f o r m a ti o n on f a s t e r d e v i ce s a nd o t h e r c u s t o mi z a ti on s . q : w h y a r e m y r e s u lt s b ac k w a r d s ? a : m a k e s u r e y ou a r e u s i n g m s b p r e w it h t h e s h i f t i n c o mm a nd a nd no t m s b f i r s t . u s e m s b f i r s t w it h t h e s h i f t o u t c o mm a nd. q : i s t h e r e a s ec ond s o u r ce f o r t h e p a k i ? a : n o. h o w e v e r , i f y ou h a v e a h i g h - vo l u m e a pp li ca ti on a nd y ou a r e c on ce r n e d a bou t a v a il a b ili t y , c on t ac t a w c a bou t ob t a i n i n g a li ce n s e t o p r odu c e y ou r o w n p a k i ' s o r ob t a i n t h e m fr o m t h i r d p a r ti e s . q : h o w ca n i c o m p a r e t w o nu m b e r s ? a : t o c o m p a r e x a nd y , s t o r e x a w a y ( u s i n g on e o f t h e s t o c o mm a nd s ) . s ub t r ac t y fr o m x a n d t h e n ca ll d i g i t 0 t o d e t e r mi n e i f t h e r e s u lt i s po s iti v e , n e g a ti v e , o r z e r o ( t h i s op e r a ti on i s v e r y
f a s t ) . t h e n r e s t o r e x . o f c ou r s e , i f y ou do n ' t mi n d d e s t r o y i n g x , y ou ca n s k i p t h e s t o a nd r c l . q : c a n t h e p a k i h a nd l e s qu a r e r oo t s ? a : n o t d i r ec t l y . t h e p a k i i , ho w e v e r , w ill . y o u ca n u s e t h e f s q r t f un c ti o n t o ca l c u l a t e a s qu a r e r oo t i nd i r ec t l y , h o w e v e r . q : c a n i u s e m o r e t h a n o n e p a k a t on e tim e ? a : y e s . y ou c a n d r i v e m u lti p l e p a k s on t h e s a m e d a t a a nd c l o c k li n e s a s l o n g a s y ou on l y e n a b l e o n e a t a tim e . o f c o u r s e , y ou c ou l d k ee p t h e m a l w a y s e n a b l e d i f y ou u s e s e p a r a t e d a t a a nd c l o c k li n e s . y ou ca n u s e a r e s o n a t o r f o r e a c h, o r y ou c a n u s e a s i n g l e r e s on a t o r a nd f e e d p i n 15 o f t h e p a k w it h t h e r e s on a t o r t o p i n 16 o f t h e o t h e r p a k s ( t h i s w ill on l y w o r k f o r a s m a ll n u m b e r o f p a k s ) . b as i c s t a m p i i l i b r a r y o n t h e e n c l o s e d d i s k y o u ' ll f i nd f u t i l . b s 2 w h i c h c o n t a i n s a s im p l e li b r a r y f o r t h e p ak - i . t h e c a ll s i n t h a t f il e a pp e a r on t h e n e x t p a g e .
c a l l f u n c ti on n o t e s f r e s e t r e s e t t h e c op r o ce ss o r a l w a y s ca ll f i r s t f a dd , fs u b , f m u l t , f d i v b a s i c op e r a ti o n s o p e r a t e o n x a n d y fs q r t s q u a r e r oo t a p p r o x i m a ti on n e w t on a pp r o x i m a ti o n ; d e s t r o y s a ll r e g i s t e r s fs q u a r e s q u a r e x f c h s c h a ng e s i g n f a b s a b s o l u t e v a l u e fs t o0 , fs t o1 , f r c l 0 , f r c l 1 s t o r e a n d r eca ll s c r a t c h p a d f l o a d x , f l o a d y l o a d v a l u e s t o x a n d y p l ace h e x nu m b e r s i n f p x h i g h a n d f p x l o w f z e r o x , f z e r o y l o a d 0 t o x o r y f p i l o a d x w i t h p i f e l o a d x w i t h e f l o a d i n t l o a d i n t e g e r t o x p l ace i n t e g e r i n f px f r ea d x r ea d x p l ace s r e s u lt i n f px h i gh a n d f p x l o w f i n t r ea d x a s i n t e g e r l e a v e s r e s u lt i n f px h i gh a n d f p x l o w f s w a p s w a p x a n d y f g e t d i g i t d ec od e a n a s c ii d i g it o r c o m p u t e s i g n u m p l ace d i g it n u m b e r i f f p x , r e t u r n s i n f pd i g i t f d u m p d u m p n u m b e r o n d e b u g t e r m i n a l s e t f p x t o n u m b e r o f d i g it s b e f o r e d ec i m a l po i n t f o p ti on s e t op ti o n s o p ti o n s i n f p x f x t o y y = x f y t o x x = y i od i r s e t i / o d i r ec ti o n r e g i s t e r d i r ec ti o n s b it s i n f px i o w r it e w r it e t o i / o p o r t d a t a o u t i n f px i o r ea d r ea d f r o m i / o po r t r e t u r n s b y t e i n f px
s p ec i f i ca t i on s a b s o l u t e m ax i m u m r a t i ng s p a r a m e t e r m i n i m u m t y p i c a l m a x i m u m s upp l y v o lt a g e 4.5 v 5 v 5.5 v v dd r i s e ti m e on po w e r u p .05 v / m s - - s upp l y c u r r e n t - 5 m a 10 m a
a m b i e n t t e m p e r a t u r e und e r b i a s - 5 5 c t o + 125 c s t o r a g e t e m p e r a t u r e - 6 5 c t o + 150 c v o l t a g e on v dd w i t h r e s p ec t t o v s s - 0.3 t o + 7.5 v t o t a l po w e r d i ss i p a t i on ( 1 ) 800 m w m a x i m u m c u rr e n t ou t o f v ss p i n 150 m a m a x i m u m c u rr e n t i n t o v d d p i n 100 m a m a x i m u m ou t pu t c u r r e n t s un k b y a n y i / o p i n 25 m a m a x i m u m ou t pu t c u r r e n t s ou r c e d b y a n y i / o p i n 20 m a m a x i m u m c u rr e n t s un k b y b 0 - b 7 150 m a m a x i m u m c u rr e n t s o u r ce d b y b 0 - b 7 100 m a dc c h a r ac t e r i s t i cs ( a t 10 m h z ) n o t es w h e n c on f i g u r e d a s i np u t s , a ll o f t h e g e n e r a l - pu r po s e i / o p i n s h a v e w e a k pu ll up r e s i s t o r s ( a bou t 20 k ) i n t e r n a l l y c o n f i g u r e d .


▲Up To Search▲   

 
Price & Availability of PAK-I

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X